package com.spring.component.exception;

/**
 * @author liushihua
 * @since 2018年03月23日
 */
public class BaseException extends RuntimeException {
  private static final long serialVersionUID = -7337331751324176488L;
  private String code;
  private String message;
  private Throwable throwable;
  private Object[] values;

  public BaseException(String code, String message, Throwable throwable) {
    this.code = code;
    this.message = message;
    this.throwable = throwable;
  }

  public BaseException(String code, String message, Throwable throwable, Object[] values) {
    this.code = code;
    this.message = message;
    this.throwable = throwable;
    this.values = values;
  }

  public String getCode() {
    return code;
  }

  public void setCode(String code) {
    this.code = code;
  }

  @Override
  public String getMessage() {
    return message;
  }

  public void setMessage(String message) {
    this.message = message;
  }

  public Throwable getThrowable() {
    return throwable;
  }

  public void setThrowable(Throwable throwable) {
    this.throwable = throwable;
  }

  public Object[] getValues() {
    return values;
  }

  public void setValues(Object[] values) {
    this.values = values;
  }
}
